<!doctype html>
<html lang="en">
<head>
    @include('web.layout.head')
    <script src="{{asset('/js/web/frame/layer-v3.0.3/layer/layer.js')}}"></script>
    <link rel="stylesheet" href="{{asset('/css/web/user/prove_invite.css')}}">
    <link rel="stylesheet" href="{{asset('/css/web/user/hehuoren.css')}}">
    <script src="{{asset('/js/web/user/ZeroClipboard.js')}}"></script>
    <script src="{{asset('/js/web/user/qrcode.js')}}"></script>
</head>
<body>
@include('web.layout.header')
@include('web.layout.user_tab')

<script type="text/javascript">
$(function(){
   $('#test5').mouseover(function(){

    $(".hhrdej").show();
})
    $('#test5').mouseout(function(){

    $(".hhrdej").hide();
})
  })
  </script>
<div class="base_member_content">
    <div class="w1200">
        @include('web.layout.member_nav')
        <div class="nav_right flr" style="background: #fff;">
            <div class="ttitle">我的推荐</div>
            <div class="tuijian01">
                <ul>
                    <li>
                        <div class="tj_title">合伙人信息</div>
                       
                        <div class="dengji">等级：标杆合伙人</div>
                        <div class="ticheng" id="test5">销售提成率：3%  <span class="moredj" >更多等级？</span>
                            <ul class='hhrdej'>
                               
                                    <li><span></span></li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <div class="tj_title">推荐好友</div>
                        <div class="dengji"><span class="gree">5</span>个</div>
                        <div class="ticheng"><a href="{{asset('/member/friends')}}"><span class="moredj">详细</span></a></div>
                    </li>
                    <li>
                        <div class="tj_title">我的佣金</div>
                        <div class="account_list">佣金总额：<span class="">¥123.00</span>元</div>
                        <div class="account_list">佣金余额：<span class="re">¥25.36</span>元<a href="{{asset('/user/cash_fir')}}">马上提现</a></div>
                        <div class="account_list">冻结佣金：<span class="re">¥0.00</span>元
                            <font>
                                ?
                                <div class="lock_commission_tit">锁定佣金为推荐的客户成为合伙人所得，佣金的解锁合伙人专员定期发布。</div>
                            </font>
                        </div>
                        {{--<div class="ticheng" style="margin-top: 0;"><a href="{{asset('/member/yongjin')}}"><span class="moredj">详细</span></a></div>--}}
                    </li>
                    <li style="border-right: none;">
                        <div class="tj_title">收到的邀请</div>
                        <div class="dengji">受邀会员：张三</div>
                        <!-- <div class="ticheng">销售提成率：1%  <span class="moredj">更多等级？</span></div> -->
                    </li>

                </ul>
            </div>
            <div class="ttitle">城市合伙人推荐流程</div>
            <div class="w600">
                <img src="{{asset('/img/web/user/tuijian.png')}}">
                <ul>
                    <li class="gree">邀请你的好友</li>
                    <li style="padding-left: 41px;color: #087dce;">注册成为会员</li>
                    <li style="padding-left: 37px;" class="re">丰厚的佣金返利</li>
                </ul>
            </div>
            <div  class="channel">
                <h2>推荐途径</h2>
                <div class="enterprise" data-id="1" data-identification="">企业方式推荐</div>
                <div class="personal" data-id="0">个人方式推荐</div>
            </div>
            <div class="fenxiang">
                <div class="fxtitle">
                    城市合伙人将以下链接分享到您的QQ群或朋友圈等，朋友注册成为会员并在e井在线采购商品及服务，采购成功后将获得丰厚的佣金返利。
                </div>
                <div class="fxcontent">
                    <div class="left">
                        <div class="fxtitle01">邀请链接</div>
                        <div class="fxurl">
                            <textarea class="website websetnet" id="biao1">http://ejing365.com/city_partner/invitehan?cp_code=tdeaotvs</textarea>
                            <span style="color: #087dce;cursor: pointer;" onClick="copyUrl2()">复制链接</span>
                        </div>
                    </div>
                    <div class="right">
                        <div class="fxtitle01">其他分享方式</div>
                        <div class="gb_resLay">
                          <div class="bdsharebuttonbox">
                            <ul class="gb_resItms">
                              <li> <a title="分享到微信" href="#" class="bds_weixin" data-cmd="weixin" ></a></li>
                              <li> <a title="分享到QQ好友" href="#" class="bds_sqq" data-cmd="sqq" ></a></li>
                              <li> <a title="分享到QQ空间" href="#" class="bds_qzone" data-cmd="qzone" ></a></li>
                              <li> <a title="分享到腾讯微博" href="#" class="bds_tqq" data-cmd="tqq" ></a></li>
                              <li> <a title="分享到新浪微博" href="#" class="bds_tsina" data-cmd="tsina" ></a></li>
                              <li> <a title="分享到人人网" href="#" class="bds_renren" data-cmd="renren" ></a></li>
                            </ul>
                          </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="tjbk">
                <div id="qrcode" class="ewma"></div>
            </div>



       </div>

    </div>
</div>
@include('web.layout.footer')
<script>
    //分享链接自定义
    var jiathis_config = {
        url: '',
        title: "有福同享，土豪喊你一起注册领福利啦",
        summary:"!"
    }

    function share(url){
        //修改分享链接
        jiathis_config.url = url;

        //原始二维码清空
        $('#qrcode').empty();
        //二维码生成插件
        var webset = document.getElementById("biao1").innerHTML;
        // new QRCode(document.getElementById('qrcode'), webset);

        // 设置参数方式
        var qrcode = new QRCode('qrcode', {
            text: 'your content',
            width: 160,
            height: 160,
            colorDark: '#000000',
            colorLight: '#ffffff',
            correctLevel: QRCode.CorrectLevel.H
        });

        // 使用 API
        qrcode.clear();
        qrcode.makeCode(webset);
    }

    share();

    function setInvitehan(invitation_type){
        $.ajax({
            url:"/member/city_partner/set_company_invitehan",
            method:"get",
            data:{invitation_type:invitation_type},
            dataType: "json",
            async:false,
            success:function(data){
                if(data.code == 0){
                    if(invitation_type == 'personal'){
                        $('.enterprise').removeClass('dq');
                        $('.personal').addClass('dq');
                    }else{
                        $('.personal').removeClass('dq');
                        $('.enterprise').addClass('dq');
                    }

                    return true;
                }else{
                   return false;
                }
            },
            error:function(){},
        });
    }

    $(function () {
        $('.personal .list28').addClass('cur');
        //企业方式推荐
        $('.enterprise').click(function () {
            var a = $(this).data('identification') == 2 ? true : false;//true为认证用户
            if(a){
                setInvitehan('company');
            }else{
                 $.MsgBox.Confirm('提示', '对不起，您的账户必须为认证用户才能以企业方式推荐。<br/>点击【确认】跳转到认证页面', function () {
                    window.location.href = AJAX_URL + '/member/prove';
                });
            }
        });

        //个人方式推荐
        $('.personal').click(function () {
            setInvitehan('personal');
        });
    });

    function copy() {
        window.clipboardData.setData("text", website.value)
    }

    //浏览器 复制网址的插件
    function copyUrl2() {
        var Url2 = document.getElementById("biao1");
        Url2.select(); // 选择对象
        document.execCommand("Copy"); // 执行浏览器复制命令
        alert("已复制好，可贴粘。");
    }
    //全局变量，动态的文章ID
        var ShareURL = "";
        //绑定所有分享按钮所在A标签的鼠标移入事件，从而获取动态ID
        $(function () {
            $(".bdsharebuttonbox a").mouseover(function () {
                ShareURL = $(this).attr("data-url");
            });
        });

        /* 
        * 动态设置百度分享URL的函数,具体参数
        * cmd为分享目标id,此id指的是插件中分析按钮的ID
        *，我们自己的文章ID要通过全局变量获取
        * config为当前设置，返回值为更新后的设置。
        */
        function SetShareUrl(cmd, config) {            
            if (ShareURL) {
                config.bdUrl = ShareURL;    
            }
            return config;
        }

        //插件的配置部分，注意要记得设置onBeforeClick事件，主要用于获取动态的文章ID
        window._bd_share_config = {
            "common": {
                onBeforeClick: SetShareUrl, "bdSnsKey": {}, "bdText": ""
                , "bdMini": "2", "bdMiniList": false, "bdPic": "http://assets.jq22.com/plugin/2017-05-24-18-14-49.png", "bdStyle": "0", "bdSize": "24"
            }, "share": {}
        };
        //插件的JS加载部分
        with (document) 0[(getElementsByTagName('head')[0] || body)
            .appendChild(createElement('script'))
            .src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='
            + ~(-new Date() / 36e5)];

</script>
</body>
</html>